<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('从业人员')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-12">
            <div th:if="${staffs} ne null" th:each="staff : ${staffs}" class="col-sm-4">
                <div class="panel panel-primary">
                    <div class="panel-heading" th:text="${staff.xm}"></div>
                    <div class="panel-body">
                        <div style="text-align: center;overflow: hidden;">
                            <img th:src="(${staff.photo} == null) ? @{/res/img/profile.jpg} : '/sys/common/view/' + @{${staff.photo}}"
                                 style="height: 175px; width: auto;" alt="Staff Image">
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-4" style="padding-top: 25px;">
                <div class="panel panel-primary">
                    <div class="panel-body">
                        <div style="text-align: center;" onclick="addStaff()">
                            <img th:src="@{/res/img/add-plus.png}" style="height: 175px; width: auto;" alt="add Image">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    function addStaff() {
        $.modal.open("添加从业人员", $.common.setURL("/control/staff/add/" + [[${id}]]));
    }
</script>
</body>
</html>
